Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--changedFilesWithAncestor #4070

Merged
merged 2 commits into from
Jul 19, 2017
Merged

--changedFilesWithAncestor #4070

merged 2 commits into from
Jul 19, 2017

Conversation

aaronabramov
Copy link
Contributor

i don't know why we chose to do it this way in WWW, but since we're doing it, we might want to implement the same for git

@codecov-io
Copy link

codecov-io commented Jul 19, 2017

Codecov Report

Merging #4070 into master will decrease coverage by <.01%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4070      +/-   ##
==========================================
- Coverage   60.41%   60.41%   -0.01%     
==========================================
  Files         196      196              
  Lines        6766     6768       +2     
  Branches        6        6              
==========================================
+ Hits         4088     4089       +1     
- Misses       2675     2676       +1     
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-config/src/valid_config.js 100% <ø> (ø) ⬆️
packages/jest-cli/src/get_changed_files_promise.js 100% <ø> (ø) ⬆️
packages/jest-config/src/index.js 0% <ø> (ø) ⬆️
packages/jest-config/src/defaults.js 85.71% <ø> (ø) ⬆️
packages/jest-config/src/normalize.js 80.97% <ø> (ø) ⬆️
packages/jest-changed-files/src/hg.js 32.25% <0%> (ø) ⬆️
packages/jest-changed-files/src/git.js 89.65% <50%> (-2.94%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22f6235...8c2a5e2. Read the comment docs.

@@ -19,6 +19,11 @@ const adapter: SCMAdapter = {
cwd: string,
options?: Options,
): Promise<Array<Path>> => {
if (options && options.withAncestor) {
throw new Error(
'`changedFilesWithAncestor` is not supported in git repos',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

. at the end ;)

@cpojer
Copy link
Member

cpojer commented Jul 19, 2017

I'm gonna approve this to unblock, but in general this feature isn't great and simply mirrors what we have done for a long time. However, it is buggy and only happens to work most of the time because it would simply run more tests than necessary.

I think the ideal solution here is to make it so that a flag like this (probably with a different name?) that will do one of two things:

  • If you have a commit or many past master/stable, it will take all of those commits and run all the related tests to all of those commits.
  • If you are on master/stable, it will only use the files that have changed locally.

Do you think we could change this behavior completely? I think this would improve UX and make it less confusing which tests are run.

@cpojer
Copy link
Member

cpojer commented Jul 19, 2017

(Approved to unblock, though)

@cpojer cpojer merged commit 3c37b21 into jestjs:master Jul 19, 2017
@cpojer
Copy link
Member

cpojer commented Jul 19, 2017

I'll merge for now, to further unblock and release a new version. We can change the behavior later and break this argument.

tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
* --changedFilesWithAncestor

* Update git.js
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants